{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "e7b6110b-a96d-42aa-b123-bd98bada976c",
   "metadata": {},
   "outputs": [],
   "source": [
    "import math"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "b575de36-965d-4cda-809f-cd48110628ee",
   "metadata": {},
   "outputs": [],
   "source": [
    "def calculate_hypotenuse(opposite, adjacent):\n",
    "    return math.sqrt(opposite**2 + adjacent**2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "50fba4ad-0de5-4543-a477-22556129466b",
   "metadata": {},
   "outputs": [],
   "source": [
    "opposite = 3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "8cc057a2-c2c9-4dca-a431-987b6f199838",
   "metadata": {},
   "outputs": [],
   "source": [
    "adjacent = 4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "c36c350d-bcc8-45f6-afcc-0769132177ad",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "5.0"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "calculate_hypotenuse(opposite, adjacent)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "42e63984-0fac-4e86-af9b-4c6b56bba087",
   "metadata": {},
   "outputs": [],
   "source": [
    "opposite = 5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "6f2ead21-877e-4ed8-8955-c1aed1757126",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "6.4031242374328485"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "calculate_hypotenuse(opposite, adjacent)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "6eceb0f4-b9e2-4213-8d7e-6087bd7507d4",
   "metadata": {},
   "outputs": [],
   "source": [
    "adjacent = 12"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "35546944-6b52-4907-b1e6-3030d589442d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "13.0"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "calculate_hypotenuse(opposite, adjacent)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
